-
Notifications
You must be signed in to change notification settings - Fork 616
Procedural macro for views #3400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
joshua-spacetime
wants to merge
26
commits into
master
Choose a base branch
from
joshua/view-macro
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit extends various schema and schema-adjacent structures to describe procedures, a new kind of database function which are allowed to perform side effects. This includes extending `RawModuleDefV9` with a way to register `RawProcedureDefV9`s in the `misc_exports`, preserving compatibility with modules that predate procedures. The module validation path is reorganized somewhat to validate various properties related to procedures while preserving code clarity and maintainability. Additionally, the `ArgsTuple` machinery for ser/de-ing reducer arguments using the argument type as a seed is extended to also support procedure arguments. All of this is currently unused.
4f1713b
to
af7f1b1
Compare
Prior to this commit, we never actually checked that reducers had unique names. My new `check_function_names_are_unique` assumed this invariant, but we were silently ignoring duplicate reducer names. With this commit, `check_function_names_are_unique` actually validates uniqueness not only between the two sets, but within them. This commit also adds three tests for the three possible ways to have a duplicate name: two reducers, two procedures, or one of each.
12ce4a3
to
9ae7866
Compare
# Description of Changes * Small cleanups in `tools/check-diff.sh` * Use `tools/check-diff.sh` wherever appropriate * Simplify the `sdks/csharp/tools~/gen-*.sh` files after the repo merge # API and ABI breaking changes None. # Expected complexity level and risk 1 # Testing - [x] CI still passes Co-authored-by: Zeke Foppa <[email protected]>
# Description of Changes Check that our generated C# files are up-to-date in our CI. # API and ABI breaking changes None. # Expected complexity level and risk 1 # Testing - [x] CI all passes --------- Co-authored-by: Zeke Foppa <[email protected]>
# Description of Changes * Make sure the user provides at least one of `--rust-and-cli`, `--typescript`, or `--csharp`, since providing none of them is a no-op as of #3308 * Do a semver-parsing of the arg before doing anything, and use that parsed version everywhere * Consolidate some version strings that we were computing in a few places # API and ABI breaking changes None # Expected complexity level and risk 1 # Testing - [x] Running `cargo bump-versions 1.5.0 --typescript --rust-and-cli --csharp` only shows a diff in the change dates --------- Co-authored-by: Zeke Foppa <[email protected]>
# Description of Changes Host-side changes extracted from #3327 I added AUTO_INC_OVERFLOW even though we don't currently ever return it, in order to future-proof so it's already there when we start emitting it. Prepublish was failing because it was expecting a wasm module unconditionally, so now it takes ?host_type. I tweaked JS deser to accept null/undefined when the unit type or an option type is expected. I switched to bsatn, because the native sats->js translator wasn't matching what js was expecting. I renamed the sys module: my thinking is that `spacetime:` as a scheme will help disambiguate it, and maybe it could also be used for IMC in the future or something? And I believe we had discussed wanting this to be versioned, similar to wasm imports. Trying to get a borrowed str from deserialize_js doesn't work, because v8 strings don't store utf8. # Testing <!-- Describe any testing you've done, and any testing you'd like your reviewers to do, so that you're confident that all the changes work as expected! --> - [x] All this was done in the course of getting an actual typescript module to successfully publish.
# Description of Changes Python is funny, if a file `token.py` is created and another script run on the same dir, it will cause python to block: ```python python3-3.13.7/lib/python3.13/tokenize.py", line 35, in <module> from token import * File "/Users/mamcx/token.py", line 3, in <module> text = sys.stdin.read() ``` By coincidence the docs on `pg wire` use this name. Changed to one that don't cause the trouble. # Expected complexity level and risk 1 # Testing - [x] Created another script and run it, see it blocks because this...
# Description of Changes `console.log` debugging statements accidentally made it into the release. # API and ABI breaking changes None # Expected complexity level and risk 1, trivial # Testing - [x] Automated testing only
# Description of Changes - Fixed logic issue around Option<Vec<Option<>>> applying the wrong types for primitives and dropping Optional - Fixed an issue with enum vs enum variants wrapped in Option<> producing the incorrect Unreal type - Removed unnecessary and incorrect header bindings - Type fix in the tests around the Optional Int32 # API and ABI breaking changes No breaking changes # Expected complexity level and risk 2 - Reworked incorrect optional lookups which can happen recursively # Testing I built out a few simple and complex objects in a Rust module to triple-check possible cases beyond what the test framework calls out. - [x] Tested many combinations from a Rust module to an Unreal project - [x] Ran and updated Unreal test cases as necessary
# Description of Changes Removes the use of the Derived Data Cache during CI, will in # API and ABI breaking changes None # Expected complexity level and risk 1 - Small change for CI # Testing - [x] Re-ran tests on both Linux + Windows with the change
# Description of Changes See the inline comments for the motivation. This was originally introduced to our Windows CI in #3351. This PR moves it from CI to general Windows target builds, since it seems like Windows builds are now generally having this issue. # API and ABI breaking changes None # Expected complexity level and risk 1 # Testing - [x] Windows CI still passes --------- Co-authored-by: Zeke Foppa <[email protected]>
# Description of Changes We've run into a problem on Maincloud caused by a database that was writing a relatively small number of very large transactions. This was accruing many commitlog segments consuming hundreds of gigabytes of disk, but had not ever taken a snapshot, or compressed or archived any data, as the database had not progressed past one million transactions. With this PR, we take a snapshot every time the commitlog segment rotates. We still also snapshot every million transactions. One BitCraft database we looked at had 2.5 million transactions per commitlog segment, meaning that this change will not meaningfully affect the frequency of snapshots. The offending Maincloud database, however, had only 50 transactions per segment! # API and ABI breaking changes N/a # Expected complexity level and risk 3: Hastily made changes to finnicky code across several crates. # Testing I am unsure how to test these changes. - [ ] <!-- maybe a test you want to do --> - [ ] <!-- maybe a test you want a reviewer to do, so they can check it off when they're satisfied. -->
TableIndex merge logic to was missing variants. # Description of Changes This pull request fixes an issue where the TableIndex::can_merge function was missing match variants. # API and ABI breaking changes None. # Expected complexity level and risk 1 / 5 (Trivial) This is a very low-risk change. It simply adds a few lines to a match statement # Testing Manual testing confirm that creating two tables with indices with the for the missing variants no longer causes a panic.
9ae7866
to
583240f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
Adds the
#[view]
procedural macro and module describers for views.TODO:
T
andOption<T>
return typesAPI and ABI breaking changes
None
Expected complexity level and risk
2
Testing